Field of the Invention
The present invention relates to a character recognition technology.
Description of the Related Art
Character recognition, which is one of the image processes, has been widely used in a variety of scenes such as automation of transcription (OCR: Optical Character Recognition) using a fax machine or a scanner, as well as inspection of printed characters in the production lines. There has recently been a trend to enforce traceability in the factory automation industry, further increasing the needs for the technology of reading characters printed on industrial products accurately at high speeds.
Character recognition is performed basically in two stages: a character segmentation process and a character recognition process. First, detection of character regions within an image, identification of the positions of the character regions, identification of lines and layouts, and the like are performed in the character segmentation process. The subsequent character recognition process identifies which one of the pixels within each character region represents a certain character (identification of characters is also called “reading characters”).
While it is obviously important to improve the identification algorithm in order to improve character recognition accuracy, it is crucial to accurately identify the lines and layouts of the characters in the character segmentation process. A food package, for example, usually has the date of manufacture and the use-by date written in a set of two rows (two lines). However, unless the character segmentation process identifies which one of the characters (numbers) belongs to a certain line and then correctly separates a group of characters of the first line from a group of characters of the second line beforehand, the date of manufacture and the use-by date cannot be read successfully.
The fact that character strings are curved (a character string in the same line is written crookedly) is one of the reasons why line recognition (determining which character belongs to a certain line) cannot be performed correctly. The following are some of the typical reasons why such curved character strings are formed:                the characters are printed on the surface of an object that is not flat;        the object itself with characters printed thereon is curved (i.e., characters are printed on a sheet-like object or an object whose surface expands and shrinks);        the layout design in which the character strings are written crookedly; and        the printed characters are crooked due to a problem with the printer.        
In addition, another problem in the image processing is that the lines cannot be recognized successfully when there are a number of characters in an image or when noise (stains, etc.) is misrecognized as characters.
Patent Literature 1, prior art pertaining to recognizing lines of crooked character strings, discloses a method for scanning a horizontally written document to recognize the characters in which whether two adjacent characters are in a single line or not is determined based on the degree of vertical overlap between the bounding rectangles of the two adjacent characters and a group of characters arranged in a single line is extracted by repeating this determination. This method might be effective in a document with a relatively wide spacing between lines (i.e., high separability between lines) and in an image with lines of characters arranged in an orderly fashion. Unfortunately, for a narrow line spacing or crooked character strings, there is a risk that the method may misrecognize the lines. For instance, consider an image containing the character strings shown in FIG. 15 (the first line: “123;” the second line: “ABCD”). The method disclosed in Patent Literature 1 might erroneously determine that “3” and “C” are located in the same line, as a result of searching in order of “1”->“2”->“3,” starting from “1.” Consequently, the method proceeds with the search to another line, such as “3”->“C”->“D,” resulting in segmenting a character string “123CD” as a single line. Since the searching process ends up with searching in order of “A”->“B” in the next line, starting with “A,” the misrecognition that occurs in the first line causes misrecognition of the second line as well.
Patent Literature 2 discloses a method for determining whether a line to be recognized in a document with combinations of vertical and horizontal lines is a vertical line or a horizontal line, based on the number of characters in each line, proximity between the characters, the size of the characters, the degree of homogeneity in spacing, and the like. This method, however, is not intended to recognize lines of crooked character strings, and even if this method is applied it is difficult to accurately recognize the lines of character strings shown in FIG. 15.